# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

load("//bazel:pl_build_system.bzl", "pl_cc_library")
load("//bazel:proto_compile.bzl", "pl_cc_proto_library", "pl_go_proto_library", "pl_proto_library", "pl_py_proto_library")

pl_proto_library(
    name = "metadata_pl_proto",
    srcs = ["metadata.proto"],
    visibility = ["//src:__subpackages__"],
    deps = [
        "//src/shared/types/typespb:types_pl_proto",
        "@gogo_grpc_proto//gogoproto:gogo_pl_proto",
    ],
)

pl_cc_proto_library(
    name = "metadata_pl_cc_proto",
    proto = ":metadata_pl_proto",
    visibility = ["//src:__subpackages__"],
    deps = [
        "//src/shared/types/typespb/wrapper:cc_library",
        "@gogo_grpc_proto//gogoproto:gogo_pl_cc_proto",
    ],
)

pl_go_proto_library(
    name = "metadata_pl_go_proto",
    importpath = "px.dev/pixie/src/shared/k8s/metadatapb",
    proto = ":metadata_pl_proto",
    visibility = ["//src:__subpackages__"],
    deps = [
        "//src/shared/types/typespb:types_pl_go_proto",
    ],
)

pl_cc_library(
    name = "metadata_testutils",
    testonly = 1,
    hdrs = ["test_proto.h"],
    visibility = ["//src:__subpackages__"],
    deps = [
        ":metadata_pl_cc_proto",
    ],
)

pl_py_proto_library(
    name = "metadata_pl_py_proto",
    imports = ["../../../"],
    proto = ":metadata_pl_proto",
    visibility = ["//src:__subpackages__"],
    deps = [
        "//src/shared/types/typespb:types_pl_py_proto",
    ],
)
